package cloud.xlh.my_system.mapper.login.custom;

import cloud.xlh.domin.po.UserPO;
import cloud.xlh.my_system.annotation.DataSource;
import cloud.xlh.my_system.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/6/26 17:32
 * @ Description:
 */
public interface UserMapper {
    User findByNameAndPassword(@Param("name")String name, @Param("password")String password);

    User findByUsername(String userName);

    @DataSource(value = "master")
    int register(UserPO userPO);


    @DataSource(value = "slave_1")
    List<UserPO> getAllSystemUser();

}
